﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using TrainingCenterSystem.Utils;

namespace TrainingCenterWinClient.Forms
{
    public partial class EncryptTestForm : Form
    {
        private string cipher = null;
        public EncryptTestForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string clearText = this.textBox1.Text;
            this.label1.Text=StringEncryption.EncryptString(clearText, "test");
            cipher = this.label1.Text;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.label1.Text=StringEncryption.Decrypt(cipher, "test");
        }
    }
}
